﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace HdipCricketClub.Models
{
    [MetadataType(typeof(OpponentMetaData))]
    public partial class Opponent
    {
    }

    public class OpponentMetaData
    {
        [Required(ErrorMessage = "Club Name is required.")]
        [StringLength(50, ErrorMessage = "Maximum name length is 50 characters")]
        [Display(Name = "Club Name:")]
        public object club_name;

        [Required(ErrorMessage = "Team Name is required.")]
        [StringLength(50, ErrorMessage = "Maximum name length is 50 characters")]
        [Display(Name = "Team Name:")]
        public object team_name;

        [Required(ErrorMessage = "Street address is required.")]
        [StringLength(30, ErrorMessage = "Maximum address length 30 characters")]
        [Display(Name = "Street 1:")]
        public object address_1;

        [Display(Name = "Street 2:")]
        [StringLength(30, ErrorMessage = "Maximum address length 30 characters")]
        public object address_2;

        [Required(ErrorMessage = "A town or city is required.")]
        [StringLength(30, ErrorMessage = "Maximum town or city length 30 characters")]
        [Display(Name = "Town / City:")]
        public object town_city;

        [Required(ErrorMessage = "A county is required.")]
        [Display(Name = "County:")]
        public object county;

        [Required(ErrorMessage = "A phone number required.")]
        [DataType(DataType.PhoneNumber)]
        [Display(Name = "Phone Number:")]
        public object phone;

        [Required(ErrorMessage = "An E Mail address is required.")]
        [Display(Name = "E Mail Address:")]
        [DataType(DataType.EmailAddress, ErrorMessage = "Incorrect E Mail address.")]
        public object email;

        [Display(Name = "Contact Name:")]
        public object contact_name;
    }


}